/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Beans;

/**
 *
 * @author ceci torres
 */
import java.sql.*;

public class DaoUser extends Dao {

    public String getNameByEmail(String email) throws SQLException {
        String sql = "SELECT * FROM usuarios WHERE email='" + email + "'";
        PreparedStatement ps = conexion.prepareStatement(sql);
        ResultSet rs = ps.executeQuery();

        if (rs.next()) {
            return rs.getString("name");
        }

        return null;
    }
}